<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>      
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="../Master/masters.xhtml">
            <ui:define name="content">
                <div class="templatemo_h_line">
                </div>
                <h1>Edit Complaints</h1>
                <p:panel id="display" style="border: none;margin-top: -10px"> 
                    <p:panel id="report" style="border: none" > 
                        <h:panelGroup rendered="#{!profile.alertEdit.equals('a')}">
                            <div class="notification success png_bg">

                                <div>
                                    #{profile.alertEdit}
                                </div>
                            </div>
                        </h:panelGroup>
                    </p:panel>
                    <p:row >
                        <p:column>
                            <h:outputLabel value="Complaint title: " style="float: left;padding-right: 10px;font-weight: bold;"/>
                            <h:inputText styleClass="mediumfield" value="#{profile.title}"></h:inputText>

                        </p:column><br/><br/>
                    </p:row>
                    <p:row>
                        <p:column><h:outputLabel value="Content: " style="vertical-align: top;font-weight: bold;"/></p:column>   
                        <p:column><p:editor id="editor"  value="#{profile.content}" width="520"/></p:column> 
                    </p:row>
                    <br></br>
                    <p:row>
                        <p:column><h:outputLabel value="Complaints Category: " style="vertical-align: top;font-weight: bold;"/></p:column>   
                        <p:column><h:selectOneMenu value="#{profile.categorySelected}">

                                <f:selectItems value="#{profile.categorys}"></f:selectItems>
                            </h:selectOneMenu></p:column> 
                    </p:row>
                    <br></br>
                    <br></br>
                    <p:row> 
                        <p:column></p:column>
                        <p:column><h:commandButton styleClass="buttonContent1" value="Edit Complaint"  action="#{profile.editComplaint()}" /> </p:column> 
                    </p:row> 
                </p:panel>  
            </ui:define>
        </ui:composition>
    </h:body>
</html>

